/**
 * 
 */
package steffens.java.gui.defaultui.general;

import java.awt.Color;
import java.awt.Container;
import java.awt.Panel;


/**
 * @author Steffen Baumann
 * @version 1.0 
 *
 */
public abstract class DefaultBar implements SizeRequester{

	private Panel container = new Panel();
	private ParentNotifier parentNotifier = null;
	public static final Color SWING_BACKGROUND_COLOR = new Color(215,215,215);
	public static final Color AWT_BACKGROUND_COLOR = Color.WHITE;
	private Color background = SWING_BACKGROUND_COLOR;
	
	
	protected Container getBarContainer(){
		return container;
	}
	protected void setBarJComponent(Panel container){
		this.container = container;
	}
	/**
	 * 
	 */
	public DefaultBar() {	}
	public void setBackgroundColor(Color color){
		container.setBackground(color);
		container.repaint();
	}
	public abstract void updateBar();
	protected void setParentNotifier(ParentNotifier parentNotifier){
		this.parentNotifier = parentNotifier;
	}
	protected ParentNotifier getParentNotifier(){
		return parentNotifier;
	}
	/**
	 * @return the background
	 */
	public Color getBackground() {
		return background;
	}
	/**
	 * @param background the background to set
	 */
	public void setBackground(Color background) {
		this.background = background;
	}
}
